package wusiyuan.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.alibaba.fastjson.JSON;

import dao.CityDao;
import dao.ProvinceDao;
import dao.impl.CityDaoImpl;
import dao.impl.CountyDaoImpl;
import dao.impl.ProvinceDaoImpl;
import entity.UserAddress;

/**
 * Servlet implementation class ShowTheNewAddressServlet
 */
public class ShowTheNewAddressServlet extends HttpServlet {

	private ProvinceDao pd = new ProvinceDaoImpl();
	private CityDao cd = new CityDaoImpl();
	private CountyDaoImpl cdi = new CountyDaoImpl();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		HttpSession session = request.getSession(); 
		Object ob = session.getAttribute("User_Address");
	
		
		response.getWriter().print(JSON.toJSONString(ob));		
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
